
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UpgradeLogRequest struct {

	Title string `json:"title" form:"title"`

	Content string `json:"content" form:"content"`

	FirstVersion string `json:"first_version" form:"first_version"`

	SecondVersion string `json:"second_version" form:"second_version"`

	ThirdVersion string `json:"third_version" form:"third_version"`

	FourthVersion string `json:"fourth_version" form:"fourth_version"`

	ErrorData string `json:"error_data" form:"error_data"`

	UpgradeTime string `json:"upgrade_time" form:"upgrade_time"`

	PackageLink string `json:"package_link" form:"package_link"`

	DataLink string `json:"data_link" form:"data_link"`

}

func (r *UpgradeLogRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UpgradeLogRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"title": "required",

		"content": "required",

		"first_version": "required",

		"second_version": "required",

		"third_version": "required",

		"fourth_version": "required",

		"error_data": "required",

		"upgrade_time": "required",

		"package_link": "required",

		"data_link": "required",

	}
}

func (r *UpgradeLogRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UpgradeLogRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UpgradeLogRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
